<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引用vue.js库 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- {{变量}} 模板渲染 -->
        hello:{{name}}
    </div>
    <script>
        let vm = new Vue({
            // 根据id获取到容器div
            el:"#app",
            // data表示数据
            data:{
                name:"vue.js"
            }
        });
        // 可以通过Vue对象中的name属性来改写数据
        // vm.name = "hello blog"
        // vm.$data.name = "new vue.js" 
        vm._data.name = "haha" 

    </script>
    
</body>
</html>